<template>
    <div>
        <div style="text-align:center">
        <el-upload 
            action="http://localhost:8888/tthRecognition/animal"
            list-type="picture-card"
            :on-success="successHandler">
            <i class="el-icon-plus"></i>
        </el-upload>
        </div>
        <div>
            <h3>识别结果：</h3>
            {{resp}}
            <el-table :data="resp.result">
                <el-table-column label="精确度" align="center" prop="score"></el-table-column>
                <el-table-column label="动物名称" align="center" prop="name"></el-table-column>
                </el-table>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            resp:{}
        }
    },
    methods:{
    successHandler(resp){
      this.resp = resp;
    }

  }

}
</script>


<style lang="sass" scoped>

</style>